import { Input, Row, Col, Form } from 'antd';
import React from 'react';
import '@ant-design/compatible/assets/index.css';

import styles from './AuditForms.less';

const FormItem = Form.Item
const CompensationForm = props => {
    const cData = props.allDatas

    return (
      <div className='formItems'>
        {
          cData.orderDetailInfo && cData.orderDetailInfo.payType === '0'
          ?
          <Form >
            <Row gutter={16}>
              <Col md={6} >
                <FormItem   label='经济舱：'>
                  <Input value={cData.eCompensateInfo && cData.eCompensateInfo.cpsNum} disabled addonAfter="(元)" />
                </FormItem>
              </Col>
              <Col md={6} >
                <FormItem   label='儿童比例：'>
                  <Input value={cData.eCompensateInfo && cData.eCompensateInfo.childStd} addonAfter="(%)" disabled/>
                </FormItem>
              </Col>
              <Col md={6} >
                <FormItem   label='婴儿比例：'>
                  <Input value={cData.eCompensateInfo && cData.eCompensateInfo.babyStd} addonAfter="(%)" disabled/>
                </FormItem>
              </Col>
            </Row>
            <Row  gutter={16}>
              <Col md={6} >
                <FormItem   label='公务舱：'>
                  <Input value={cData.bCompensateInfoVo && cData.bCompensateInfoVo.cpsNum} addonAfter="(元)" disabled/>
                </FormItem>
              </Col>
              <Col md={6} >
                <FormItem   label='儿童比例：'>
                  <Input value={cData.bCompensateInfoVo && cData.bCompensateInfoVo.childStd} addonAfter="(%)"  disabled/>
                </FormItem>
              </Col>
              <Col md={6} >
                <FormItem   label='婴儿比例：' >
                  <Input value={cData.bCompensateInfoVo && cData.bCompensateInfoVo.babyStd} addonAfter="(%)"  disabled/>
                </FormItem>
              </Col>
            </Row>
            <Row  gutter={16}>
              <Col md={6} >
                <FormItem   label='客票差价：'>
                  <Input value={cData[2] && cData[2]} disabled addonAfter="(元)" />
                </FormItem>
              </Col>
            </Row>
          </Form>
          :
          <Form>
            <Row gutter={16}>
              <Col md={6} >
                <FormItem   label='补偿金额：'>
                  <Input value={cData.customCompensateInfo && cData.customCompensateInfo.cpsNum} disabled addonAfter="(元)" />
                </FormItem>
              </Col>
            </Row>
            <div style={{marginTop: '10px'}}>注：具体补偿信息，详见对应事故单</div>
          </Form>
        }

      </div>

     )
  }

export default CompensationForm